Making a bootable linux USB using dd
in Linux is actually pretty easy. The only requirements are to already have a working Linux bootable USB or at least a working Linux installation, and to have dd
installed. Thankfully, dd
comes by default in almost every Linux distro.
dd
is dangerous for your files so you should only use it against drives that do not store ANY important data. YOU HAVE BEEN WARNED.So, how do you flash ISOs to a USB drive using dd
?
Open a terminal. This can usually be achieved by hitting Ctrl + Alt + T
type lsblk
and press enter
Find which block device your USB drive is, as determined by the size indicated on screen. Here's a small example: I know that is my USB because it's just 32GB. If you have other devices of an identical size, it's highly advised to unplug them, so as not to risk targeting the wrong device.
Take note of the "sdb" or whatever set of letters assigned to your USB drive. It could be sda, sdc, sdd, and etc. And using this would mean adding /dev/ before the set of letters. Example: /dev/sda /dev/sdb /dev/sdc /dev/sdd
Get the full path of your .iso file
For example, my .iso file is in Downloads
on my Drauger OS install, and it may be there if you just downloaded it using a web browser. With that in mind, the path should be something like this:
/home/[username]/Downloads
or
$HOME/Downloads
or
~/Downloads
I prefer the first format because it does not get ruined by bash autocompletion that is triggered when you press tab in the terminal. If you want to be absolutely sure that you have the right file, open another terminal, and try typing:
cd /home/[username]/Downloads
Then, invoke the ls
command and see if the file is in there.
Do note that you have to replace [username] with your user's name.
If you do not know your username, you can figure that out by running the whoami
command.
Execute:
sudo dd if=(path to your ISO) of=(path to your block device) status=progress
remember to change the values above to what you actually have else you will end up writing to some random file and not your USB, BE CAREFUL.
Brew a cup of tea, a pot of coffee, or eat a quick snack and wait for it finish. Please be patient as this process naturally takes a while to finish.
Once it is done, go verify that the USB's name in file manager has changed accordingly and verify if you can open the USB to see its new contents and (if you are knowledgeable about file systems), verify that you can read the files just to be sure
Reboot PC and try to boot the USB by changing the boot order to it. Remember to disable Secure Boot!
If all goes well you should have a working Live USB drive that boots just fine! Have fun and happy hacking!